package com.example.robertluozizhao.framecollectdemo.event.observer;

import java.util.Observable;

/**
 * Created by robert.luozizhao on 2018/1/24.
 */

public class MyObserable extends Observable {
    private static MyObserable instance;

    private MyObserable() {
    }

    public static MyObserable getInstance() {
        if (instance == null) {
            synchronized (MyObserable.class) {
                if (instance == null) {
                    instance = new MyObserable();
                }
            }
        }
        return instance;
    }

    @Override
    public synchronized void setChanged() {
        super.setChanged();
    }
}
